Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(DOCSP-33540): React Native: Update Connect to an App Services App with auth hooks #3176

Merged
merged 4 commits into from
Feb 9, 2024

Conversation

dacharyc
Copy link
Collaborator

@dacharyc dacharyc commented Feb 8, 2024

Pull Request Info

Note for reviewer: the tests are failing due to a known issue when you run all the tests in this test suite. I ran the new test here many times locally and it is passing.

Jira ticket: https://jira.mongodb.org/browse/DOCSP-33540

Reminder Checklist

Before merging your PR, make sure to check a few things.

  • Did you tag pages appropriately?
    • genre
    • meta.keywords
    • meta.description
  • Describe your PR's changes in the Release Notes section
  • Create a Jira ticket for related docs-app-services work, if any

Release Notes

  • React Native SDK
    • Atlas App Services/Connect to an App Services App: Update examples to use new auth hooks.
    • API Reference/App Provider: Update useApp example to remove old auth pattern.

Review Guidelines

REVIEWING.md

Copy link

github-actions bot commented Feb 8, 2024

Readability for Commit Hash: c344421

You can see any previous Readability scores (if they exist) by looking
at the comment's history.

Readability scores for changed documents:

  • source/sdk/react-native/api-reference/app-provider: Grade Level: 10.9, Reading Ease: 30.02
  • source/sdk/react-native/app-services/connect-to-app-services-app: Grade Level: 7.0, Reading Ease: 61.73

For Grade Level, aim for 8 or below.

For Reading Ease scores, aim for 60 or above:

Score Difficulty
90-100 Very Easy
80-89 Easy
70-79 Fairly Easy
60-69 Medium
50-59 Fairly Hard
30-49 Hard
0-29 Very Hard

For help improving readability, try Hemingway App.

Copy link
Collaborator

@krollins-mdb krollins-mdb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor suggestion. LGTM! Thank you, Dachary!

const loggedInUserText = await screen.findByTestId('logged-in-user-id');
expect(loggedInUserText).not.toEqual(null);

const notYetLoggedIn = screen.queryByText('No one is logged in yet.');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I wish we could use the findBy* for everything because we can await results, but as you probably noticed, you can't test a negative with them. If findBy* doesn't find what it wants, it errors the whole test. 😢

This does mean there could be edge cases where queryByText isn't in sync with the rendered UI (because it's not waiting to find UI elements). But this is a great use for it.

Co-authored-by: Kyle Rollins <[email protected]>
@dacharyc dacharyc merged commit 5229ef9 into mongodb:master Feb 9, 2024
5 of 6 checks passed
@dacharyc dacharyc deleted the DOCSP-33540 branch February 9, 2024 19:06
@docs-builder-bot
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants